When an object is scanned by a conventional scanner, an adjustable tray is used in the scanner for detecting the left and right margins of the object. However, when assembling the scanner, some errors are always generated so that the left and right margins of the object can not be accurately detected. Furthermore, during the process for adjusting the charge coupled device, even more errors are generated and hence it is necessary to spend much more time on this adjusting work.